﻿<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="Equipment.DataAccess" %>

<%  Dim req As Requirement = Model%>
<div id="groupDialog_<%: req.ID %>" title="'<%: req.Name %>' groups." class="hidden">
    <table class="empty-table">
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <th>
                Review:
            </th>
            <td>
                <%= Html.DropDownList(String.Format("ReviewType_{0}", req.ID))%>
            </td>
        </tr>
        <tr>
            <th width="50px"  class="top">
                Group:
                
            </th>
            <td>
                <div id="dialogGroupContent" style="height:290px; overflow:scroll;">
                <table class="data-table">
                        <thead>
                            <tr>
                                <th>
                                    &nbsp
                                </th>
                                <th class="top">
                                    Group
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <% For Each group In ViewData("Groups")%>
                            <tr>
                                <td>
                                    <%= Html.CheckBox(String.Format("cbxGroup_req{0}_goup{1}", req.ID, group.ID), ViewData(String.Format("SelectedGroup_req{0}_goup{1}", req.ID, group.ID)) IsNot Nothing)%>
                                </td>
                                <td>
                                    <%: group.Description%>
                                </td>
                            </tr>
                            <% Next%>
                        </tbody>
                    </table>
                </div>
            </td>
            <th width="100px" class="top">
                Review Group:
            </th>
            <td>
                <div id="dialogGroupReviewContent" style="height:290px; overflow:scroll;">
                <table class="data-table">
                        <thead>
                            <tr>
                                <th>
                                    &nbsp
                                </th>
                                <th class="top">
                                    Group
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <% For Each group In ViewData("Groups")%>
                            <tr>
                                <td>
                                    <%= Html.CheckBox(String.Format("cbxReviewGroup_req{0}_goup{1}", req.ID, group.ID), ViewData(String.Format("SelectedReviewGroup_req{0}_goup{1}", req.ID, group.ID)) IsNot Nothing)%>
                                </td>
                                <td>
                                    <%: group.Description%>
                                </td>
                            </tr>
                            <% Next%>
                        </tbody>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <br />
                <div class="right">
                    <input type="submit" class="button" value="Save" onclick="saveGroups(<%: req.ID %>); return false;" />
                    <input type="submit" class="button" value="Cancel" onclick="closeDialog(<%: req.ID %>); return false;" />
                </div>
            </td>
        </tr>
    </table>
</div>